$(document).ready(function () {
    //var id = getQueryString("id");
    //var weid = getQueryString("weid");
    //$(".idcheck").html(id+","+weid);

    if ($(".hidden_ca").val() == "1") {
        $("a").each(function () {
            //alert($(this));
            var href = $(this).attr('href');
            //alert(href);
            if (href != undefined) {
                if (href.indexOf("tel") > -1 || href.indexOf("sms") > -1 || href.indexOf("fundetail.aspx") > -1 || href.indexOf("javascript") > -1) {

                }
                else {
                    if (href.indexOf("weixingongzuoshi.com") > -1) {

                    }
                    else {
                        href = "http://www.weixingongzuoshi.com/weizhan/" + href;
                    }
                    href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9adb05124e79d517&redirect_uri=" + encodeURIComponent(href) + "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
                    $(this).attr('href', href);

                }
            }

        });
    }

})
function nochangea() {
    $(".hidden_ca").val('0');
}
function sendmsg(nickname, url) {
    var id = getQueryString("id");
    var weid = getQueryString("weid");
    if (id == "2") {
        alert(id + "," + weid);
    }
    $.ajax({
        url: "../service/base.asmx/sendmsg",
        type: "POST",
        data: { id: id, weid: weid, nickname: nickname, url: url },
        dataType: "text",
        success: function (data) {
           
        },
        error: function (data) {
            
            //alert(data.responseText);

        }
    });
}
function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
        return unescape(r[2]);
    }
    return "0";
}